package cn.stylefeng.guns.modular.time.model.request;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.Date;

@Data
public class TasksRequest {

    @ChineseDescription("任务id")
    @NotNull(message = "任务ID不能为空", groups = {edit.class, delete.class, updateStatus.class})
    private Long taskId;

    @NotBlank(message = "任务标题不能为空", groups = {add.class, edit.class})
    @ChineseDescription("任务标题")
    private String title;

    @ChineseDescription("任务描述")
    private String description;

    @NotNull(message = "截止时间不能为空", groups = {add.class, edit.class})
    @ChineseDescription("截止时间")
    private Date dueDate;

    @NotBlank(message = "优先级不能为空", groups = {add.class, edit.class})
    @ChineseDescription("优先级")
    private String priority;

    @ChineseDescription("是否完成")
    private Boolean completed;

    @ChineseDescription("用户id")
    private Long userId;

    @ChineseDescription("搜索文本")
    private String searchText;

    @ChineseDescription("页码")
    private Integer pageNo = 1;

    @ChineseDescription("每页条数")
    private Integer pageSize = 10;

    @ChineseDescription("排序字段")
    private String sortField;

    @ChineseDescription("排序方式")
    private String sortOrder;

    @ChineseDescription("是否置顶：Y-已置顶，N-未置顶")
    private String pinned;

    /**
     * 添加参数校验分组
     */
    public @interface add {
    }

    /**
     * 编辑参数校验分组
     */
    public @interface edit {
    }

    /**
     * 删除参数校验分组
     */
    public @interface delete {
    }

    /**
     * 更新状态参数校验分组
     */
    public @interface updateStatus {
    }
}